<?php

//屏蔽错误
error_reporting( 0 );
//引入操作类
require_once '../inc/medoo.php';
//引入数据库
require_once '../inc/conn.php';
//引入配置
require_once '../inc/config.php';

?>

<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<title><?php  echo sysname; ?> <?php echo version; ?> - Powered by Y.Z.W</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" href="../inc/layui/css/layui.css" media="all">
</head>

<body>

<?php include("../inc/head.php"); ?>

<!-- **********数据表零 开始********** -->
<?php
	$soname=$_GET['soname']; //获取搜索框数据
	//echo $soname; //测试输出
	//查询数据集
	$datas = $database->select(dbtable0, "*", [  //这里决定搜索的表***   <!-- +++++++++++++++修改+++++++++++++++ -->
		ssname02."[~]" => $soname  //这里决定模糊搜索的字段***          //<!-- +++++++++++++++修改+++++++++++++++ -->
		//ssname02."[=]" => $soname  //这里决定准确搜索的字段***
		,"ORDER" => [pxfield0=>pxname0]   //这里决定结果排序的字段
	]);
?>

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  <legend><?php if(soname0<>""){echo soname0;}?></legend>   <!-- +++++++++++++++修改+++++++++++++++ -->
</fieldset>
<blockquote class="layui-elem-quote">
    <?php
    //搜索查询合计数据行数
        $count = $database->count(dbtable0, "*", [   //<!-- +++++++++++++++修改+++++++++++++++ -->
            ssname02."[~]" => $soname                 //<!-- +++++++++++++++修改+++++++++++++++ -->
            //ssname02."[=]" => $soname                 //<!-- +++++++++++++++修改+++++++++++++++ -->
            ]);
        echo "搜计：" . $count;
    ?>
</blockquote>
<div class="layui-form">
		<table class="layui-table">
			<colgroup>
				<col>
				<col>
				<col>
				<col>
			</colgroup>
			<thead>
				<tr>
					<?php
						if (b000<>"")   //<!-- +++++++++++++++修改+++++++++++++++ -->
						{
							echo "<th>";
							echo b000;
							echo "</th>";
						}
						if (b001<>"")
						{
							echo "<th>";
							echo b001;
							echo "</th>";
						}
						if (b002<>"")
						{
							echo "<th>";
							echo b002;
							echo "</th>";
						}
						if (b003<>"")
						{
							echo "<th>";
							echo b003;
							echo "</th>";
						}
						if (b004<>"")
						{
							echo "<th>";
							echo b004;
							echo "</th>";
						}
						if (b010<>"")
						{
							echo "<th>";
							echo b010;
							echo "</th>";
						}
						if (b011<>"")
						{
							echo "<th>";
							echo b011;
							echo "</th>";
						}
						if (b012<>"")
						{
							echo "<th>";
							echo b012;
							echo "</th>";
						}
						if (b013<>"")
						{
							echo "<th>";
							echo b013;
							echo "</th>";
						}
						if (b014<>"")
						{
							echo "<th>";
							echo b014;
							echo "</th>";
						}
						if (b015<>"")
						{
							echo "<th>";
							echo b015;
							echo "</th>";
						}
						if (b016<>"")
						{
							echo "<th>";
							echo b016;
							echo "</th>";
						}
						if (b017<>"")
						{
							echo "<th>";
							echo b017;
							echo "</th>";
						}
						if (b018<>"")
						{
							echo "<th>";
							echo b018;
							echo "</th>";
						}
						if (b019<>"")
						{
							echo "<th>";
							echo b019;
							echo "</th>";
						}
						if (b020xs<>"")
						{
							echo "<th>";
							echo b020;
							echo "</th>";
						}
					?>
				</tr>
			</thead>
			<tbody>

				<?php 
					foreach($datas as $data)
					{
						echo "<tr>";
						if (b000<>"")
						{
							echo "<td>";
							echo $data["w000"] ;
							echo "</td>";
						}
						if (b001<>"")
						{
							echo "<td>";	
							echo $data["w001"];
							echo "</td>";
						}
						if (b002<>"")
						{
							echo "<td>";	
							echo $data["w002"];
							echo "</td>";
						}
						if (b003<>"")
						{
							echo "<td>";	
							echo $data["w003"];
							echo "</td>";
						}
						if (b004<>"")
						{
							echo "<td>";	
							echo $data["w004"];
							echo "</td>";
						}

						if (b010<>"")
						{
							echo "<td>";	
							echo $data["w100"];
							echo "</td>";
						}
						if (b011<>"")
						{
							echo "<td>";	
							echo $data["w101"];
							echo "</td>";
						}
						if (b012<>"")
						{
							echo "<td>";	
							echo "<a href='https://www.baidu.com/s?wd=".$data['w102']."' target='_blank'>".$data['w102'];
							echo "</td>";
						}
						if (b013<>"")
						{
							echo "<td>";	
							echo $data["w103"];
							echo "</td>";
						}
						if (b014<>"")
						{
							echo "<td>";	
							echo $data["w104"];
							echo "</td>";
						}
						if (b015<>"")
						{
							echo "<td>";	
							echo $data["w105"];
							echo "</td>";
						}
						if (b016<>"")
						{
							echo "<td>";	
							echo "<a href='https://www.baidu.com/s?wd=".$data['w106']."' target='_blank'>".$data['w106'];
							echo "</td>";
						}
						if (b017<>"")
						{
							echo "<td>";	
							echo $data["w107"];
							echo "</td>";
						}
						if (b018<>"")
						{
							echo "<td>";	
							echo $data["w108"];
							echo "</td>";
						}
						if (b019<>"")
						{
							echo "<td>";	
							echo "<a href='https://www.baidu.com/s?wd=".$data['w109']."' target='_blank'>".$data['w109'];
							echo "</td>";				
						}
						if (b020xs<>"")   //<!-- +++++++++++++++修改+++++++++++++++ -->
						{
							echo "<td>";
							echo "<a class='layui-btn layui-btn-primary layui-btn-xs' lay-event='detail' href='reply.php?id=".$data["w000"]."'>回复</a>";
							echo "<a class='layui-btn layui-btn-xs' lay-event='edit' href='edit.php?id=".$data["w000"]."'>编辑</a>";
							echo "<a class='layui-btn layui-btn-danger layui-btn-xs' lay-event='del' href='del.php?id=".$data["w000"]."'>删除</a>";
							echo "</td>";
						}
						echo "</tr>";
					}
					echo "</table>";
						?>
			</tbody>
		</table>
	</div>
<!-- **********数据表零 结束********** -->
	
<?php include("../inc/foot.php"); ?>

</body>
</html>